<?php
session_start();
require '../nette/Nette/loader.php';
require '../db.php';
require '../localization/lang.php';
require '../core/core.sanitizer.php';
require '../core/core.security.php';
require '../core/core.dfs.php';
require '../visual/visual.dfs.php';

$login=new core_security;
if ($login->checklogin()=="OK" AND $_SESSION['role']<=1) {
$users="";
$query="select login from users";
$result=mysql_query($query);

while ($row=mysql_fetch_array($result)) {
	$users=$users.",".$row['login'];
	}


$dfs = new core_dfs_node($spojeni, 'tree');
$dfs->set_values_by_id($_POST['id']);
$dfs->name=$_POST['value'];
echo $dfs->add_validate();
$dfs->add();

}
?>
